﻿CREATE PROCEDURE [ServiceEngine].[ListPublishedOperationsForEndpoint]
	@EndpointID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	OV.[OperationVersionID] as ID, N.[EntityName] as OpName, OV.[VersionMajor] as Major, OV.[VersionMinor] as Minor, OV.[VersionBuild] as Build, OV.[VersionQFE] as QFE
	FROM	[ServiceEngine].Endpoints_PublishedOperations PO 
	JOIN	[ServiceEngine].OperationVersions OV on PO.OperationVersionID = OV.OperationVersionID
	JOIN	[ServiceEngine].Names N on OV.OperationID = N.EntityID
	WHERE	PO.EndpointID = @EndpointID
	Order by N.[EntityName]
END


